package com.twu.biblioteca;

import java.util.List;

public class BibliotecaViewController {

    private final BibliotecaView bibliotecaView;
    private BookLoader bookLoader;

    public BibliotecaViewController()
    {
        bibliotecaView = new BibliotecaView(new ConsolePrinter(System.out));
        bookLoader = new BookLoader();

    }
    public BibliotecaViewController(BibliotecaView bibliotecaView, BookLoader bookLoader)
    {
        this.bibliotecaView = bibliotecaView;
        this.bookLoader = bookLoader;
    }

    public void Initialize()
    {
        bibliotecaView.DisplayWelcomeMessage();

        List<Book> bookList = bookLoader.LoadBookList();
        bibliotecaView.DisplayBookList(bookList);
    }

}
